home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
bitmap
/
colorset.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
10KB
|
333 lines
VERSION 2.00
Begin Form ColorSetForm
Caption = "Color Settings"
ClientHeight = 990
ClientLeft = 195
ClientTop = 6075
ClientWidth = 9120
Height = 1395
Left = 135
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 990
ScaleWidth = 9120
Top = 5730
Width = 9240
Begin HScrollBar BGScrl
Height = 315
Index = 2
LargeChange = 16
Left = 4320
Max = 255
TabIndex = 7
Top = 660
Width = 1575
End
Begin HScrollBar FGScrl
Height = 315
Index = 2
LargeChange = 16
Left = 300
Max = 255
TabIndex = 15
Top = 660
Width = 1575
End
Begin CommandButton Cancel
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 8040
TabIndex = 17
Top = 540
Width = 1035
End
Begin HScrollBar BGScrl
Height = 315
Index = 1
LargeChange = 16
Left = 4320
Max = 255
TabIndex = 5
Top = 360
Width = 1575
End
Begin HScrollBar FGScrl
Height = 315
Index = 1
LargeChange = 16
Left = 300
Max = 255
TabIndex = 13
Top = 360
Width = 1575
End
Begin CommandButton Apply
Caption = "Apply"
Default = -1 'True
Height = 375
Left = 8040
TabIndex = 16
Top = 60
Width = 1035
End
Begin PictureBox BG
Height = 915
Left = 5940
ScaleHeight = 885
ScaleWidth = 1665
TabIndex = 2
Top = 60
Width = 1695
End
Begin HScrollBar BGScrl
Height = 315
Index = 0
LargeChange = 16
Left = 4320
Max = 255
TabIndex = 1
Top = 60
Width = 1575
End
Begin PictureBox FG
Height = 915
Left = 1920
ScaleHeight = 885
ScaleWidth = 1665
TabIndex = 10
Top = 60
Width = 1695
End
Begin HScrollBar FGScrl
Height = 315
Index = 0
LargeChange = 16
Left = 300
Max = 255
TabIndex = 9
Top = 60
Width = 1575
End
Begin Label BGText
Alignment = 2 'Center
BackColor = &H00FF0000&
Caption = "B"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 2
Left = 4080
TabIndex = 6
Top = 660
Width = 255
End
Begin Label FGText
Alignment = 2 'Center
BackColor = &H00FF0000&
Caption = "B"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 2
Left = 60
TabIndex = 14
Top = 660
Width = 255
End
Begin Label ColorSetText
Alignment = 2 'Center
Caption = "BG"
Height = 255
Index = 3
Left = 7680
TabIndex = 0
Top = 360
Width = 315
End
Begin Label BGText
Alignment = 2 'Center
BackColor = &H0000FF00&
Caption = "G"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 1
Left = 4080
TabIndex = 4
Top = 360
Width = 255
End
Begin Label ColorSetText
Alignment = 2 'Center
Caption = "FG"
Height = 255
Index = 7
Left = 3660
TabIndex = 8
Top = 360
Width = 375
End
Begin Label FGText
Alignment = 2 'Center
BackColor = &H0000FF00&
Caption = "G"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 1
Left = 60
TabIndex = 12
Top = 360
Width = 255
End
Begin Label BGText
Alignment = 2 'Center
BackColor = &H000000FF&
Caption = "R"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 0
Left = 4080
TabIndex = 3
Top = 60
Width = 255
End
Begin Label FGText
Alignment = 2 'Center
BackColor = &H000000FF&
Caption = "R"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 315
Index = 0
Left = 60
TabIndex = 11
Top = 60
Width = 255
End
End
Dim DefaultFG As Long, DefaultBG As Long
'-- indicates that the form is initialized, used in Form_Resize
' see the BGScrl_Change (or FGScrl_Change) events for the reason this is needed
Dim FormInit As Integer
Sub Apply_Click ()
Hide
End Sub
Sub BGScrl_Change (Index As Integer)
'-- Index has a range from 0 to 2
BGText(Index).BackColor = BGScrl(Index).Value * &H100 ^ Index
'-- if the form is initializing (in the Resize event), don't change the
' backcolor because otherwise we'll only get the first value (Red) correct
' the reason for this is the first time this is called, we just set the
' 0th Scrl value, values 1 and 2 haven't been set, but when we execute
' the next statement, it'll reset the BackColor which the Form_Resize event
' uses to set the Scrl values themselves!
If Not FormInit Then
BG.BackColor = RGB(BGScrl(0).Value, BGScrl(1).Value, BGScrl(2).Value)
End